﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GapJunctionSimulation.BaseClasses
{
    public class GapJunction
    {
        public Cell Source { get; set; }
        public Cell Destination { get; set; }

        public GapJunction(Cell source, Cell destination)
        {
            Source = source;
            Destination = destination;
            Source.GapJunctions.Add(this);
            Destination.GapJunctions.Add(this);
        }

        public void StimulateCell()
        {
            Destination.Stimulated = true;
            Destination.LastCellInSequence = true;      // last cell that is stimulated will be known
            Source.LastCellInSequence = false;
        }
    }
}
